Declare Function CreateIconIndirect Lib "User32" (icoinfo As ICONINFO) As Long
Declare Function CreateBrushIndirect Lib "gdi32" (lpLogBrush As LOGBRUSH) As Long
Declare Function ExtFloodFill Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, ByVal crColor As Long, ByVal fuFillType As Long) As Long
Declare Function DestroyIcon Lib "User32" (ByVal hIcon As Long) As Long
Declare Function OleCreatePictureIndirect Lib "olepro32.dll" (lpPictDesc As PICTDESC, riid As GUID, ByVal fOwn As Long, IPic As IPicture) As Long
Declare Sub CopyMemory Lib "Kernel32" Alias "RtlMoveMemory" (pDest As Any, pSource As Any, ByVal ByteLen As Long)
Declare Function GSM Lib "User32" Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long
Declare Function GetDeviceCaps Lib "gdi32" (ByVal hDC As Long, ByVal nIndex As Long) As Long
Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hDC As Long) As Long
Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Declare Function SelectObject Lib "gdi32" (ByVal hDC As Long, ByVal hObject As Long) As Long
Declare Function DeleteDC Lib "gdi32" (ByVal hDC As Long) As Long
Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Declare Function GetStockObject Lib "gdi32" (ByVal nIndex As Long) As Long
Declare Function Polygon Lib "gdi32" (ByVal hDC As Long, lpPoints As POINTAPI, ByVal nCount As Long) As Long
Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hDC As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Declare Function GetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, ByVal lpBits As Any) As Long
Declare Function GlobalLock Lib "Kernel32" (ByVal hMem As Long) As Long
Declare Function GlobalUnlock Lib "Kernel32" (ByVal hMem As Long) As Long
Declare Function GetIconInfo Lib "User32" (ByVal hIcon As Long, icoinfo As ICONINFO) As Long
Declare Function GetNearestColor Lib "gdi32" (ByVal hDC, ByVal RGBColor As Long) As Long
Declare Function GetPrivateProfileInt Lib "Kernel32" Alias "GetPrivateProfileIntA" (ByVal Appname As String, ByVal KeyName As String, ByVal DEFAULT As Long, ByVal FileName As String) As Long
Declare Function GetPrivateProfileString Lib "Kernel32" Alias "GetPrivateProfileStringA" (ByVal Appname As String, ByVal KeyName As String, ByVal DEFAULT As String, ByVal ReturnedString As String, ByVal MaxSize As Long, ByVal FileName As String) As Long
Declare Function WritePrivateProfileString Lib "Kernel32" Alias "WritePrivateProfileStringW" (ByVal Appname As String, ByVal KeyName As String, ByVal NewString As String, ByVal FileName As String) As Long
Declare Function StretchBlt Lib "gdi32" (ByVal hDCDest, ByVal X As Long, ByVal Y As Long, ByVal Width As Long, ByVal Height As Long, ByVal hDCSrc, ByVal srcX As Long, ByVal srcY As Long, ByVal srcWidth As Long, ByVal srcHeight As Long, ByVal Rop As Long) As Long
Declare Function WinHelp Lib "User32" Alias "WinHelpA" (ByVal hWnd, ByVal HelpFile As String, ByVal wCommand As Long, ByVal dwData As Long) As Long
Declare Function InvertRect Lib "User32" (ByVal hDC, lpRect As RECT) As Long
Declare Function GetMenu Lib "User32" (ByVal hWnd) As Long
Declare Function GetSubMenu Lib "User32" (ByVal hWnd, ByVal Position As Long) As Long
Declare Function GetSystemMenu Lib "User32" (ByVal hWnd, ByVal bRevert As Long) As Long
Declare Function RemoveMenu Lib "User32" (ByVal hMenu, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Declare Function TrackPopupMenu Lib "User32" (ByVal hMenu, ByVal r1 As Long, ByVal X As Long, ByVal Y As Long, ByVal r2 As Long, ByVal hWnd As Long, ByVal r3 As Long) As Long
Global Const BLACK_BRUSH = 4
Global Const NOTSRCERASE = &H1100A6 ' (DWORD) dest = (NOT src) AND (NOT dest)
Global Const WHITENESS = &HFF0062 ' (DWORD) dest = WHITE
Global Const FLOODFILLSURFACE = 1
Global Const SRCAND = &H8800C6 ' (DWORD) dest = source AND dest
Global Const SRCINVERT = &H660046 ' (DWORD) dest = source XOR dest
Global Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
Global Const BLACKNESS = &H4262 ' (DWORD) dest = BLACK
Global Const BITSPIXEL = 12 ' Number of bits per pixel
Global Const PLANES = 14 ' Number of planes
Global Const SM_CXICON = 11
Global Const SM_CYICON = 12
Global Const BS_SOLID = 0
Global Const MF_BYPOSITION = &H400
Global Const HELP_CONTEXT = &H1
Global Const HELP_QUIT = &H2
Global Const HELP_HELPONHELP = &H4
Global IID_IDispatch As GUID
#Else
Type RECT
Left As Integer
Top As Integer
Right As Integer
bottom As Integer
End Type
'
' Window API Function Declarations
'
Declare Function BitBlt Lib "Gdi" (ByVal hDCDest, ByVal X As Integer, ByVal Y As Integer, ByVal Width As Integer, ByVal Height As Integer, ByVal hDCSrc As Integer, ByVal srcX As Integer, ByVal srcY As Integer, ByVal Rop As Long) As Integer
Declare Function CreateCompatibleBitmap Lib "Gdi" (ByVal hDC, ByVal Width As Integer, ByVal Height As Integer) As Integer
Declare Function CreateCompatibleDC Lib "Gdi" (ByVal hDC) As Integer
Declare Function DeleteDC Lib "Gdi" (ByVal hDC) As Integer
Declare Function DeleteObject Lib "Gdi" (ByVal hObject) As Integer
Declare Function ExtFloodFill Lib "Gdi" (ByVal hDC, ByVal X As Integer, ByVal Y As Integer, ByVal crColor As Long, ByVal wFillType As Integer) As Integer
Declare Function GetBitmapBits Lib "Gdi" (ByVal hBitmap, ByVal dwCount As Long, ByVal lpBits As Long) As Long
Declare Function GetDeviceCaps Lib "Gdi" (ByVal hDC, ByVal nIndex As Integer) As Integer
Declare Function GetMenu Lib "User" (ByVal hWnd) As Integer
Declare Function GetNearestColor Lib "Gdi" (ByVal hDC, ByVal RGBColor As Long) As Long
Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal Appname As String, ByVal KeyName As String, ByVal DEFAULT As Integer, ByVal FileName As String) As Integer
Declare Function GetPrivateProfileString Lib "Kernel" (ByVal Appname As String, ByVal KeyName As String, ByVal DEFAULT As String, ByVal ReturnedString As String, ByVal MaxSize As Integer, ByVal FileName As String) As Integer
Declare Function GetSubMenu Lib "User" (ByVal hWnd, ByVal Position As Integer) As Integer
Declare Function GetSystemMenu Lib "User" (ByVal hWnd, ByVal bRevert As Integer) As Integer
Declare Function GlobalLock Lib "Kernel" (ByVal mMem As Integer) As Long
Declare Function GlobalUnlock Lib "Kernel" (ByVal mMem As Integer) As Integer
Declare Function InvertRect Lib "User" (ByVal hDC, lpRect As RECT) As Integer
Declare Function RemoveMenu Lib "User" (ByVal hMenu, ByVal nPosition As Integer, ByVal wFlags As Integer) As Integer
Declare Function SelectObject Lib "Gdi" (ByVal hDC, ByVal hObject) As Integer
Declare Function SetBitmapBits Lib "Gdi" (ByVal hBitmap, ByVal dwCount As Long, ByVal lpBits As Long) As Long
Declare Function StretchBlt Lib "Gdi" (ByVal hDCDest, ByVal X As Integer, ByVal Y As Integer, ByVal Width As Integer, ByVal Height As Integer, ByVal hDCSrc, ByVal srcX As Integer, ByVal srcY As Integer, ByVal srcWidth As Integer, ByVal srcHeight As Integer, ByVal Rop As Long) As Integer
Declare Function TrackPopupMenu Lib "User" (ByVal hMenu, ByVal r1 As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal r2 As Integer, ByVal hWnd As Integer, ByVal r3 As Long) As Integer
Declare Function WinHelp Lib "User" (ByVal hWnd, ByVal HelpFile As String, ByVal wCommand As Integer, ByVal dwData As Long) As Integer
Declare Function WritePrivateProfileString Lib "Kernel" (ByVal Appname As String, ByVal KeyName As String, ByVal NewString As String, ByVal FileName As String) As Integer
'
' Window API Constant Declarations
'
Global Const SRCCOPY = &HCC0020
Global Const SRCAND = &H8800C6
Global Const SRCINVERT = &H660046
Global Const BLACKNESS = &H42&
Global Const FLOODFILLSURFACE = 1
Global Const MF_BYPOSITION = &H400
Global Const BITSPIXEL = 12
Global Const HELP_CONTEXT = &H1
Global Const HELP_QUIT = &H2
Global Const HELP_HELPONHELP = &H4
#End If
'
' Type use by IconWorks to keep track of the 6 Icons that be edited at once.
'
Type ICONRECORD
FileName As String
FullPath As String
Changed As Integer
End Type
'
' INI file KeyNames
'
Global Const APP_NAME = "IconWorks"
Global Const KEY_COLOR = "Colors Row"
Global Const KEY_GRID = "Grid"
Global Const KEY_LINE_GRID = "Line Grid"
Global Const KEY_DOTTED_GRID = "Dotted Grid"
Global Const KEY_STATUS_BAR = "Status Bar"
Global Const KEY_TOOL_PALETTE = "Tool Palette"
Global Const KEY_COLOR_PALETTE = "Color Palette"
Global Const KEY_ZOOM_SCROLLBAR = "Zoom Scrollbar"